package com.zsrt.java.day20161226.lh.day161226.demo12;

public class ArrayUtil {
	public static void printArray(int[] arrays) {
		int len=arrays.length;
		for(int index=0;index<len;index++){
			int value=arrays[index];
			if(index==len-1){
				System.out.print(value);
				break;
			}
			System.out.print(value+", ");
			}
		System.out.println();
		
		}
	
	public static void main(String[] args) {
		int[] ages=new int[3];
		ages[0]=23;
		ages[1]=18;
		ages[2]=16;
		printArray(ages);
		
	}
		
	

}
